﻿<UserControl x:Class="Mengsk.ProxyDelivery.App.UI.Delivery.WarehouseUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="1000">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <StackPanel Grid.Row="0" Orientation="Horizontal">
            <Button Name="btnSearch" Content="查询" Margin="3" VerticalAlignment="Center" Click="btnSearch_Click" Width="60"/>
            <Button Name="btnEdit" Content="编辑" Margin="3" VerticalAlignment="Center" Click="btnEdit_Click" Width="60"/>
            <Button Name="btnAdd" Content="增加" Margin="3" VerticalAlignment="Center" Click="btnAdd_Click" Width="60"/>
        </StackPanel>
        
        <DataGrid Grid.Row="1" Name="dgvWarehouse" Margin="3" AutoGenerateColumns="False" GridLinesVisibility="All" IsReadOnly="True" SelectionUnit="FullRow" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="编号" Binding="{Binding Id}"/>
                <DataGridTextColumn Header="仓库名称" Binding="{Binding Name}"/>
                <DataGridTextColumn Header="联系电话" Binding="{Binding Phone}"/>
                <DataGridTextColumn Header="状态" Binding="{Binding Enabled,Converter={StaticResource boolConverter},ConverterParameter=禁用|启用}"/>
                <DataGridTextColumn Header="创建时间" Binding="{Binding CreateTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
                <DataGridTextColumn Header="更新时间" Binding="{Binding UpdateTime,StringFormat=yyyy-MM-dd HH:mm:ss}"/>
                <DataGridTextColumn Header="地址" Binding="{Binding Address}" Width="*"/>
            </DataGrid.Columns>
        </DataGrid>
        
        
    </Grid>
</UserControl>
